package kr.co.dayve.site.management.service;

import kr.co.dayve.site.domain.*;
import org.springframework.web.multipart.MultipartFile;

import java.io.File;
import java.io.IOException;
import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * User: Yusung
 * Date: 12. 2. 1
 * Time: 오후 3:58
 * To change this template use File | Settings | File Templates.
 */
public interface PhotoBoardService {

    // Community Board Service
    public abstract List getBoardListBySearchword(PhotoBoard board);
    public abstract List getBoardListByNo(PhotoBoard board);
    public abstract String getTotalCountBySearchword(PhotoBoard board);
    public abstract String getTotalCountByNo(PhotoBoard board);
    public abstract String writeBoard(PhotoBoard board);
    public abstract String updateBoard(PhotoBoard board);
    public abstract String deleteBoard(PhotoBoard board);
    public abstract PhotoBoard getBoardByNo(String photo_board_no);

    public abstract String updateReplyCount(PhotoBoard board);
    public abstract String updateHitCount(PhotoBoard board);
    public abstract String updateVoteCount(PhotoBoard board);
    public abstract String updateNegativeCount(PhotoBoard board);
    public abstract String updateReportCount(PhotoBoard board);

    public abstract DayveFile uploadFile(MultipartFile file, String realPath);
    public abstract String createThumbnail(File src, File dest, int width, int height) throws IOException;

    public abstract String checkDuplicateVote(Vote vote);
    public abstract String insertVoterToList(Vote vote);

    public abstract String photoBoardReport(Report report);
    public abstract String checkDuplicateReport(Report report);

    public abstract String updateBoardNotImage(PhotoBoard board);
}
